Skip to content

chore: Upgrade to Expo SDK 55#40

Merged
sidorchukandrew merged 15 commits intomainfrom
as/expo-55-upgrade
Mar 24, 2026
Merged

chore: Upgrade to Expo SDK 55#40
sidorchukandrew merged 15 commits intomainfrom
as/expo-55-upgrade

Conversation

@sidorchukandrew
Copy link
Collaborator

@sidorchukandrew sidorchukandrew commented Mar 15, 2026

Description

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation update
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • test: Test additions or updates
  • build: Build system or dependency changes
  • ci: CI configuration changes
  • chore: Other changes (maintenance, etc.)

Breaking Changes

  • This PR contains BREAKING CHANGES

Breaking Change Details:

Migration Guide:

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All commit messages follow conventional commits format
  • I have updated the appropriate section in documentation (if needed)

Open with Devin

To make the app run on Expo 55, there were a few more
packages that needed updating. Also, I've added Expo UI
to use for our components.
Expo's recommendations now are to use the `<Host />`
component in JS land instead.
Expo's guidance is to set `matchContents` on the
`<Host />` component in JS.
@sidorchukandrew sidorchukandrew self-assigned this Mar 15, 2026
@sidorchukandrew sidorchukandrew marked this pull request as ready for review March 15, 2026 00:41
This is to prevent the button from collapsing when
in it's being centrally aligned in a flex box layout.
@cameronapak
Copy link
Collaborator

@greptileai, can you please review this PR?

Copy link
Collaborator

@cameronapak cameronapak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Andrew, good work. As long as this works, it looks good to me. I don't see any issues. Thank you for doing the meticulous hard work for getting this upgraded!

Copy link
Collaborator

@cameronapak cameronapak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

@cameronapak
Copy link
Collaborator

One flag posed by Devin AI is:

src/mocks/@expo/ui/swift-ui.ts

Mock files placed in src/mocks/ rather than mocks/ directory

CONTRIBUTING.md states 'Place mocks in mocks/ directory' under Code Organization. The new mock files are placed in src/__mocks__/@expo/ui/ instead. The existing mocks/RNYouVersionPlatform.ts follows the documented convention. However, the __mocks__ location mirrors the module path structure which is a common Jest convention, and the moduleNameMapper in package.json:37-40 explicitly maps to these paths, so the placement is functional. This is a gray area — the mocks work correctly, but the location deviates from the documented convention.

If this is relevant, please follow suit

@sidorchukandrew
Copy link
Collaborator Author

One flag posed by Devin AI is:

src/mocks/@expo/ui/swift-ui.ts
Mock files placed in src/mocks/ rather than mocks/ directory
CONTRIBUTING.md states 'Place mocks in mocks/ directory' under Code Organization. The new mock files are placed in src/__mocks__/@expo/ui/ instead. The existing mocks/RNYouVersionPlatform.ts follows the documented convention. However, the __mocks__ location mirrors the module path structure which is a common Jest convention, and the moduleNameMapper in package.json:37-40 explicitly maps to these paths, so the placement is functional. This is a gray area — the mocks work correctly, but the location deviates from the documented convention.

If this is relevant, please follow suit

This is a good callout and I can see how it can be confusing/misleading. The mocks/ directory are the mocks that our SDK exports. The src/__mocks__ directory is specifically for mocks in our own tests.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR upgrades the SDK from Expo SDK 54 to SDK 55, migrating all native view modules and TypeScript components to the new ExpoUIView + Host rendering pattern introduced in SDK 55.

Key changes:

  • iOS modules: All five view modules (BibleReaderView, BibleTextView, BibleWidgetView, SignInWithYouVersionButton, VotdView) migrated from SwiftUIView/AutoSizingStack to ExpoUIView, and the Swift views now conform to ExpoSwiftUI.View without the now-removed ShadowNodeProxy environment object
  • TypeScript components: Each component now wraps its NativeView in a Host (from @expo/ui/swift-ui) with appropriate matchContents props; SignInWithYouVersionButton additionally applies a fixedSize() SwiftUI modifier via @expo/ui/swift-ui/modifiers
  • Default Bible version: Changed from 111 to 3034 (Berean Standard Bible) consistently across Android (YVPVotdView.kt), iOS (YVPVotdView.swift), and the JS layer (VotdView.tsx)
  • Peer dependencies: @expo/ui tightened from * to >=55.0.0 and expo updated to >=55.0.0
  • Example app: Dependencies bumped to RN 0.83.2 / React 19.2.0; newArchEnabled and edgeToEdgeEnabled flags removed since SDK 55 + RN 0.83 enable both by default
  • Test mocks: New mocks added for @expo/ui/jetpack-compose and @expo/ui/swift-ui/modifiers

The migration is implemented consistently across all platforms and the previously flagged concerns (dead shadowNodeProxy code and overly permissive @expo/ui peer range) are both resolved in this PR.

Confidence Score: 5/5

  • This PR is safe to merge — the SDK 55 migration is consistent across all platforms with no logic errors or breaking changes introduced.
  • The migration is mechanically straightforward and applied uniformly to all five view components on both iOS and Android. No bugs were found: the Host/matchContents layout strategy is correctly chosen per component (flex:1 for full-screen reader, matchContents vertical for auto-height widgets, matchContents both-axes for the button), the default bibleVersionId change is consistent in all three layers (Kotlin, Swift, TypeScript), and the previously flagged shadowNodeProxy dead code and over-permissive peer dep range are both resolved here.
  • No files require special attention.

Important Files Changed

Filename Overview
src/components/BibleTextView.tsx Migrated to SDK 55 Host wrapper pattern; uses flexDirection row + flexGrow on NativeView for auto-sizing instead of matchContents
src/components/VotdView.tsx Migrated to Host + matchContents pattern; default bibleVersionId updated from 111 to 3034 (BSB)
src/components/SignInWithYouVersionButton.tsx Migrated to Host wrapper with fixedSize() modifier; imports CommonViewModifierProps and fixedSize from @expo/ui/swift-ui/modifiers
src/components/BibleReaderView.tsx Migrated to Host wrapper with flex:1 for full-screen rendering; no matchContents needed
src/components/BibleWidgetView.tsx Migrated to Host + matchContents; NativeProps type has a redundant style field but it is not passed at runtime
ios/Views/YVPBibleTextView.swift Migrated to ExpoSwiftUI.View conformance; removed AutoSizingStack and shadowNodeProxy — clean migration
ios/RNBibleTextViewModule.swift Swapped SwiftUIView for ExpoUIView; now imports ExpoUI directly per SDK 55 module API
android/src/main/java/com/youversion/reactnativesdk/views/YVPVotdView.kt Default bibleVersionId changed from 111 to 3034 (BSB), consistent with iOS and JS-layer defaults
package.json peerDependency for @expo/ui tightened to >=55.0.0; expo bumped to ^55.0.0; @expo/ui devDep pinned to ~55.0.2
example/app.json Removed newArchEnabled and edgeToEdgeEnabled flags; SDK 55 with RN 0.83 handles both by default

Sequence Diagram

sequenceDiagram
    participant JS as React (TypeScript)
    participant Host as Host (@expo/ui/swift-ui)
    participant NV as NativeView (requireNativeView)
    participant Mod as ExpoUIView Module (Swift)
    participant SwiftUI as ExpoSwiftUI.View (Swift)

    JS->>Host: render with style / matchContents
    Host->>NV: render child with props
    NV->>Mod: bridge call (ExpoUIView)
    Mod->>SwiftUI: instantiate YVP*View(props:)
    SwiftUI-->>Mod: SwiftUI body (BibleTextView / VotdView / etc.)
    Mod-->>NV: rendered native frame
    NV-->>Host: sized native view
    Host-->>JS: final laid-out component
Loading

Reviews (2): Last reviewed commit: "chore: require expo ui to be SDK 55 or h..." | Re-trigger Greptile

@sidorchukandrew sidorchukandrew merged commit ca5e59b into main Mar 24, 2026
3 checks passed
@sidorchukandrew sidorchukandrew deleted the as/expo-55-upgrade branch March 24, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants